/*
 * 程序入口
 * @Author: bobo
 * @Date: 2020-12-31 16:21:26
 */
import Vue from 'vue'
import 'normalize.css/normalize.css'
import ELEMENT from 'element-ui'
import './styles/index.scss' // global css
import router from './router.js'
import App from './App.vue'
import DynaRouterUtil from "@/utils/DynaRouterUtil";
import store from '@/store'
//全局初始化
import './api/api-helper.js'
import './icons/index.js'
import './permission.js'
Vue.use(ELEMENT);
Vue.config.productionTip = false

new Vue({
  router: router,
  render: h => h(App),
  created: function () {
    //界面刷新后，动态路由重置
    DynaRouterUtil.resetRoutesWhenRefreshed(this.$router);
    //重新初始化缓存信息
    store.user().init();
  },
  mounted: function () {
    console.log("main(入口)--mounted");
  },
  destroyed: function () {
    console.log("main（入口）---destroyed");
  },
}).$mount('#app')